<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <button @click="showDialog">hhhhhh</button>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component({
  components: {
  }
})
export default class Home extends Vue {
  private showDialog () {
    console.log(this)
    this.$createModal({
      type: 'confirm',
      title: '确认退出?',
      content: '我是内容',
      showClose: true,
      icon: 'warning',
      confirmBtn: {
        text: '退出',
        active: true,
        href: 'javascript:;'
      },
      cancelBtn: {
        text: '取消',
        active: false,
        href: 'javascript:;'
      },
      onConfirm: () => {
        console.log(1111)
      },
      onCancel: () => {
        console.log(2222)
      }
    }).show()
  }
}
</script>
